package com.sky.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.Map;

@Mapper
public interface ReportMapper {
    /**
     * 根据时间来查询统计营业额
     * @param map
     * @return
     */
    @Select("select sum(amount) from orders where order_time > #{begin} and order_time < #{end} and status = #{status}")
    Double sumByMap(Map map);
}
